import React, { Component } from 'react';
import {
    View,
    Text,
    Button,
} from 'react-native';

export default class Home extends Component {
    constructor(props) {
        super(props);
        this.state = {showText: true};
        // alert(this.props.name)
    }
    static defaultProps = {
        name: 'lindf',
        sex: '男',
    };
    render() {
        return (
            <View>
                <Text style={{fontSize: 20,color: '#000'}}>this is name {this.props.name}</Text>
                <Text style={{fontSize: 20,color: '#000'}}>this is sex {this.props.sex}</Text>
                <Button
                    onPress={() => this.props.navigate('Next',{
                        id: "I am Home's id"
                    })}
                    title="点击跳转"
                />
            </View>
        )
    }
}

